package cn.iocoder.yudao.module.system.controller.admin.appversion.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - App版本控制 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AppVersionRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8139")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "备注", example = "你猜")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "公司ID", example = "11561")
    @ExcelProperty("公司ID")
    private Long deptId;

    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "平台", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "平台", converter = DictConvert.class)
    @DictFormat("system_app_platform") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String platform;

    @Schema(description = "更新日志", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("更新日志")
    private String updateLog;

    @Schema(description = "版本名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @ExcelProperty("版本名称")
    private String versionName;

    @Schema(description = "内部版本号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("内部版本号")
    private Integer versionCode;

    @Schema(description = "发布时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("发布时间")
    private LocalDateTime publishTime;

    @Schema(description = "支持最低版本", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("支持最低版本")
    private Integer minVersionCode;

    @Schema(description = "更新类型(1普通更新 2强制更新)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "更新类型(1普通更新 2强制更新)", converter = DictConvert.class)
    @DictFormat("system_update_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer updateType;

    @Schema(description = "下载地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
    @ExcelProperty("下载地址")
    private String downloadUrl;

}